<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<HEAD>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<title>GM test</title>
		<script language="javascript" src="prototype.js"></script>
		<script language="javascript" SRC="gm2.js"></script>
		<script language="javascript">

			function test(){

				var btn = $('test');
				btn.addClassName('ttt');

				GMLibTest.run();
			}

			function ajax(){

				var surl = 'http://web.chttl.com.tw/';

//				gm.Ajax.load(
//					surl,
//					function(container, data){
//						gm.Console.log(container.id);
//						gm.Console.log(data.param1);
//					},
//					{ param1: 'hahaha' }
//				);

				gm.Console.log('ajax');

				new Ajax.Request('http://web.chttl.com.tw/',{
					method: 'get',
					onSuccess: function(r){
						alert(r);
						gm.Console.log('onComplete');
						//try{
						//	switchAjaxHint(hash, gm.Consts.ENUM_ONOFF.OFF);
						//	var div = insertAjaxHtml(getAjaxHtmlBody(r));
						//	try{
						//		callback(div, userData);
						//	}finally{ gm.Dom.del(div);	}
						//}catch(e){
						//	gm.Console.log(e);
						//}
					}
				});

			}

		</script>
	</HEAD>

	<BODY>

	<input ID="test" TYPE="button" ONCLICK="test();" VALUE="test">

	<input ID="test" TYPE="button" ONCLICK="ajax();" VALUE="ajax">

	</body>
</html>


